﻿using ParkSaleForAdmin.FunctionWindow;
using System.Windows;
using System.Windows.Controls;

namespace ParkSaleForAdmin
{
    /// <summary>
    /// MainPage.xaml 的交互逻辑
    /// </summary>
    public partial class MainPage : Page
    {

        public const string Location = "小区管理", Company = "公司管理", User = "用户管理", Park = "车位管理", Order = "订单管理", Discount = "优惠券管理", Message = "消息管理", Owned = "房产管理", AD = "广告管理", ParkRights = "车位所有权管理";
        public MainPage()
        {
            InitializeComponent();

        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Button button = (Button)sender;
            //MessageBox.Show(button.Content.ToString());
            switch (button.Content.ToString())
            {
                case Location:
                    new LocationWindow().Show();
                    break;
                case Company:
                    new CompanyManagement().Show();
                    break;
                case AD:
                    new AD().Show(AD);
                    break;
                case User:
                    new User().Show(User);
                    break;
                case Park:
                    new ParkWindow().Show();
                    break;
                case Order:
                    new Order().Show(Order);
                    break;
                case Message:
                    new MessageManager().Show(Message);
                    break;
                case ParkRights:
                    new ParkRights().Show(ParkRights);
                    break;
                case Discount:
                    new Discount().Show(Discount);
                    break;
                case Owned:
                    new OwnHouse().Show(Owned);
                    break;
            }
        }
    }
}
